{"ast":null,"code":"import * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nexport default function usePresets(presets, legacyRanges) {\n  return React.useMemo(function () {\n    if (presets) {\n      return presets;\n    }\n    if (legacyRanges) {\n      warning(false, '`ranges` is deprecated. Please use `presets` instead.');\n      var rangeLabels = Object.keys(legacyRanges);\n      return rangeLabels.map(function (label) {\n        var range = legacyRanges[label];\n        var newValues = typeof range === 'function' ? range() : range;\n        return {\n          label: label,\n          value: newValues\n        };\n      });\n    }\n    return [];\n  }, [presets, legacyRanges]);\n}","map":{"version":3,"names":["React","warning","usePresets","presets","legacyRanges","useMemo","rangeLabels","Object","keys","map","label","range","newValues","value"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-picker/es/hooks/usePresets.js"],"sourcesContent":["import * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nexport default function usePresets(presets, legacyRanges) {\n  return React.useMemo(function () {\n    if (presets) {\n      return presets;\n    }\n\n    if (legacyRanges) {\n      warning(false, '`ranges` is deprecated. Please use `presets` instead.');\n      var rangeLabels = Object.keys(legacyRanges);\n      return rangeLabels.map(function (label) {\n        var range = legacyRanges[label];\n        var newValues = typeof range === 'function' ? range() : range;\n        return {\n          label: label,\n          value: newValues\n        };\n      });\n    }\n\n    return [];\n  }, [presets, legacyRanges]);\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,OAAO,MAAM,oBAAoB;AACxC,eAAe,SAASC,UAAU,CAACC,OAAO,EAAEC,YAAY,EAAE;EACxD,OAAOJ,KAAK,CAACK,OAAO,CAAC,YAAY;IAC/B,IAAIF,OAAO,EAAE;MACX,OAAOA,OAAO;IAChB;IAEA,IAAIC,YAAY,EAAE;MAChBH,OAAO,CAAC,KAAK,EAAE,uDAAuD,CAAC;MACvE,IAAIK,WAAW,GAAGC,MAAM,CAACC,IAAI,CAACJ,YAAY,CAAC;MAC3C,OAAOE,WAAW,CAACG,GAAG,CAAC,UAAUC,KAAK,EAAE;QACtC,IAAIC,KAAK,GAAGP,YAAY,CAACM,KAAK,CAAC;QAC/B,IAAIE,SAAS,GAAG,OAAOD,KAAK,KAAK,UAAU,GAAGA,KAAK,EAAE,GAAGA,KAAK;QAC7D,OAAO;UACLD,KAAK,EAAEA,KAAK;UACZG,KAAK,EAAED;QACT,CAAC;MACH,CAAC,CAAC;IACJ;IAEA,OAAO,EAAE;EACX,CAAC,EAAE,CAACT,OAAO,EAAEC,YAAY,CAAC,CAAC;AAC7B"},"metadata":{},"sourceType":"module"}